//    Copyright (C) Kherty.  All rights reserved.
using System;
using System.Globalization;
using System.Windows.Data;
using System.Reflection;

namespace OpenLS.Spreadsheet.UI.Internals
{
    class MethodInfoToParametersConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            var i = (MethodInfo)value;
            if (i == null)
                return null;
            return i.GetParameters();
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotSupportedException();
        }
    }
}